﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SageKing.Database.SqlSugar.Entity.Contracts;

/// <summary>
/// SageKing消息结构属性表 基类
/// </summary>
public class SysSageKingMessageAttributeBase : EntityBase, IEntityVersionValidation
{
    [Required]
    [SugarColumn(ColumnDescription = "版本", DefaultValue = "0")]
    public virtual long Version { get; set; } = 0;

    [Required]
    [SugarColumn(ColumnDescription = "SageKing消息结构Id")]
    public virtual long MessageId { get; set; }

    /// <summary>
    /// 属性名称
    /// </summary>
    [Required, MaxLength(64)]
    [SugarColumn(ColumnDescription = "属性名称", Length = 64)]
    public virtual string Name { get; set; }

    [Required]
    [SugarColumn(ColumnDescription = "类型")]
    public DataStreamTypeEnum Type { get; set; }

    /// <summary>
    /// 状态
    /// </summary>
    [SugarColumn(ColumnDescription = "状态")]
    public virtual bool Status { get; set; }

    /// <summary>
    /// 是否必填
    /// </summary>
    [SugarColumn(ColumnDescription = "是否必填")]
    public virtual bool Required { get; set; } = false;

    /// <summary>
    /// 显示名称
    /// </summary> 
    [SugarColumn(ColumnDescription = "显示名称", Length = 64)]
    public virtual string? DisplayName { get; set; }


    [SugarColumn(ColumnDescription = "描述")]
    public virtual string? Description { get; set; }

}
